{include file="public/header" /}
</head>
<body>
<form class="layui-form layui-form-pane" action="" style="padding: 20px;">
    <input type="hidden" name="page_id" value="{$dataInfo.page_id|default=0}">
    {notempty name="SUBSTATIONS"}
    <input type="hidden" name="substation_id" value="{$dataInfo.substation_id|default=$SUBSTATIONS}">
    {/notempty}
    <div class="layui-form-item">
        <label class="layui-form-label">栏目名称</label>
        <div class="layui-input-block">
            <input type="text" name="page_name" required lay-verify="required"  placeholder="请输入栏目名称" autocomplete="off" class="layui-input" value="{$dataInfo.page_name|default=''}">
        </div>
    </div>
    <div class="layui-form-item ">
        <label class="layui-form-label">上级栏目</label>
        <div class="layui-input-block" >
            <select name="parent_id" lay-search  placeholder="请选择上级栏目" >
                <option value="">请选择</option>
                {notempty name="columnList"}
                {volist name="columnList" id="tl"}
                <option value="{$tl.page_id}" {present name="dataInfo.parent_id"}{if condition="$tl['page_id'] == $dataInfo['parent_id']"}selected{/if}{/present}>{empty name="SUBSTATIONS"}《{$tl.substation_name}》{/empty}{notempty name="$tl.level_name"}{$tl.level_name}&ensp;{/notempty}{$tl.page_name}</option>
                {/volist}
                {/notempty}
            </select>
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">排序</label>
        <div class="layui-input-block">
            <input type="text" name="sort" required lay-verify="required"  placeholder="请输入排序，（0 - 999）" autocomplete="off" class="layui-input" value="{$dataInfo.sort|default=''}">
        </div>
    </div>
    <div class="layui-form-item layui-form-text">
        <label class="layui-form-label">SEO标题</label>
        <div class="layui-input-block" >
            <textarea name="seo_title" placeholder="请输入SEO标题" class="layui-textarea">{$dataInfo.seo_title|default=''}</textarea>
        </div>
    </div>
    <div class="layui-form-item layui-form-text">
        <label class="layui-form-label">SEO关键字</label>
        <div class="layui-input-block" >
            <textarea name="seo_keyword" placeholder="请输入SEO关键字" class="layui-textarea">{$dataInfo.seo_keyword|default=''}</textarea>
        </div>
    </div>
    <div class="layui-form-item layui-form-text">
        <label class="layui-form-label">SEO描叙</label>
        <div class="layui-input-block">
            <textarea name="seo_description" placeholder="请输入SEO描叙" class="layui-textarea">{$dataInfo.seo_description|default=''}</textarea>
        </div>
    </div>
    <div class="layui-form-item layui-form-text">
        <label class="layui-form-label">正文内容</label>
        <div class="layui-input-block">
            <textarea name="text_content" id="text_content" placeholder="请输入正文内容">{$dataInfo.text_content|default=''}</textarea>
        </div>
    </div>
    {empty name="SUBSTATIONS"}
    <div id="substation_type">
        <div class="layui-form-item" pane>
            <label class="layui-form-label">发布网站</label>
            <div class="layui-input-block">
                {notempty name="userSubstationList"}
                {volist name="userSubstationList" id="vo"}
                <input type="radio" name="substation_id" value="{$vo.substation_id}" title="{$vo.substation_name}"  {notempty name="dataInfo.substation_id"}{if condition="$dataInfo['substation_id'] eq $vo['substation_id']"}checked{/if}{/notempty}>
                {/volist}
                {/notempty}
            </div>
        </div>
    </div>
    {/empty}
    <div class="layui-form-item">
        <div class="layui-input-block">
            <button class="layui-btn" type="button" lay-submit lay-filter="formDemo">立即提交</button>
        </div>
    </div>
</form>
</body>
<script>
    layui.use('form', function(){
        var form = layui.form;
        form.render();
        //监听提交
        form.on('submit(formDemo)', function(data){
            post_sub("{:url('Systems/columnPageAdd')}",data.field);
            return false;
        });
    });

    $(function () {
        //百度编辑器初始化
        UE.getEditor('text_content',{
            initialFrameWidth:'100%',
            initialFrameHeight: 500,
        });
    });
</script>
</html>